import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home/home.vue'
import Find from '../views/find/find.vue'
import ShoppingCar from '../views/shoppingCar/shoppingCar.vue'
import Profile from '../views/profile/profile.vue'
import Register from '../views/register/register.vue'
import Login from '../views/Login/login.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home',
  },
  {
    path: '/home',
    name: 'home',
    component: Home,
    meta: {
      showFooter: true,
    },
  },
  {
    path: '/find',
    name: 'find',
    component: Find,
    meta: {
      showFooter: true,
    },
  },
  {
    path: '/shoppingcar',
    name: 'shoppingcar',
    component: ShoppingCar,
    meta: {
      showFooter: true,
    },
  },
  {
    path: '/profile',
    name: 'profile',
    component: Profile,
    meta: {
      showFooter: true,
    },
  },
  {
    path: '/register',
    name: 'register',
    component: Register,
  },
  {
    path: '/login',
    name: 'login',
    component: Login,
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
})

export default router
